@import "./mixin.scss";

/* 背景色 */
.bg {
	background-color: var(--grey-0);
}

/* 页面布局 */
.page-header {
	position: relative;
	width: 100%;
	height: 70vh;
	background: var(--color-red) no-repeat center center / cover;
	z-index: -9;

	&::after {
		content: '';
		display: block;
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, .2);
		transition: all .2s ease-in-out 0s;
	}
}

.page-title {
	@include flex;
	flex-direction: column;
	position: fixed;
	width: 100%;
	height: 50vh;
	min-height: 10rem;
	padding: 4rem 5rem 0;
	font-size: 2.25em;
	color: var(--header-text-color);
	animation: titleScale 1s;
	z-index: 1;
}

.page-cover {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 70vh;
	object-fit: cover;
}

.page-container {
	position: relative;
	width: calc(100% - 0.625rem);
	margin: 1.5rem auto;
	padding: 1.75rem 2.25rem;
	border-radius: 0.75rem;
	box-shadow: 0 0 1rem var(--box-bg-shadow);
	animation: slideUpIn 1s;
}

@media (min-width: 1200px) {
	.page-container {
		width: 60.5rem;
	}
}

@media (max-width: 767px) {
	.page-container {
		padding: 1rem 0.875rem;
	}

	.page-title {
		font-size: 2rem;
		padding: 3rem 0.5rem 0;
	}
}

.main-container {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: calc(100% - 0.625rem);
	margin: 0 auto;
	padding-bottom: 1.75rem;
	animation: slideUpIn 1s;
}

.left-container {
	width: calc(100% - 18.75rem);
	transition: all 0.3s;
}

.right-container {
	position: sticky;
	top: 1rem;
	width: 18rem;
	margin-left: 0.8rem;
}

.test {
	width: 100%;
}

.temp {
	display: none;
}

@media (min-width: 1200px) {
	.main-container {
		width: 72.5rem;
	}
}

@media (max-width: 991px) {
	.left-container {
		width: 100%;
	}

	.right-container {
		display: none;
		width: 100%;
	}
}

/* 卡片 */
.side-card {
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 0 1rem var(--box-bg-shadow);
	transition: all 0.2s ease-in-out 0s;

	&:not(:first-child) {
		margin-top: 1.25rem;
	}
}

@media (max-width: 991px) {
	.side-card {
		margin: 0 1rem;
	}
}

/* 对话框 */
.dialog-wrapper {
	width: 600px !important;
}

@media (min-width: 760px) {
	.dialog-wrapper {
		padding: 2rem 2.5rem 0;
		height: 500px;
	}
}

.dialog-text {
	color: var(--grey-5);
}

.colorFlag {
	cursor: pointer;
	color: var(--grey-6);
}

/* 边距 */
.mt-4 {
	margin-top: 1rem;
}

.mt-12 {
	margin-top: 65px;
}

.mt-10 {
	margin-top: 40px;
}

.mt-11 {
	margin-top: 55px;
}

/* 隐藏抽屉滚动条 */
.n-drawer-body-content-wrapper::-webkit-scrollbar {
	display: none !important;
}

/* 代码 */
.hljs {
	font-family: "consolas";
	font-size: 1rem;
}

/* 分页 */
.n-pagination-item:hover,
.n-pagination-item--active {
	color: var(--grey-0) !important;
	background-image: linear-gradient(to right, var(--color-pink) 0, var(--color-orange) 100%) !important;
	box-shadow: 0 0 .75rem var(--color-pink-a3) !important;
	border: none !important;
}

.pagination {
	justify-content: center;
	padding: 1.25rem 3.125rem;
}

.n-pagination .n-pagination-item {
	color: var(--grey-5);
}

/* 加载更多按钮 */
.loading-warp {
	@include flex;
	margin-top: 20px;
}

.loading-warp .btn {
	letter-spacing: 1.25px;
	color: var(--grey-0) !important;
	background-image: linear-gradient(to right, var(--color-pink) 0, var(--color-orange) 100%);
}

/* 文章标签 */
.article-tag {
	display: inline-block;
	position: relative;
	font-size: 0.75em;
	padding: 0 0.3125rem;
	border-radius: 0.3125rem;
	background: var(--note-bg);
	color: var(--note-text);

	&:not(:last-child) {
		margin-right: 0.625rem;
	}

	&:hover {
		color: #e9546b;

		&:before {
			width: 104%;
			left: -2%;
		}
	}

	&:before {
		content: "";
		position: absolute;
		bottom: 0;
		height: 100%;
		width: 0;
		right: 0;
		background: var(--color-red-a1);
		border-radius: 0.25rem;
		transition: all 0.2s ease-in-out 0s;
	}
}

.tag-info {
	text-align: left;
	margin-top: 0.625rem;
	font-size: 0.75em;
}

/* 评论框 */
.reply-box {
	display: flex;
	flex-direction: column;
}

.box-normal {
	display: flex;
	height: 50px;
	transition: 0.2s;

	.reply-box-warp {
		flex: auto;
		margin-left: 0.6rem;
	}

	.reply-box-send {
		@include flex;
		flex-basis: 70px;
		margin-left: 10px;
		border-radius: 4px;
		background-color: var(--comment-btn);
		color: var(--grey-0);
		cursor: pointer;
	}

	.send-active {
		background-color: var(--color-pink);
	}
}

.reply-box-avatar {
	@include flex;
	width: 3rem;
	height: 3.125rem;
}

.reply-box-textarea {
	width: 100%;
	height: 100%;
	padding: 5px 10px;
	border: 1px solid var(--grey-3);
	border-radius: 6px;
	background-color: var(--comment-color);
	font-size: 12px;
	line-height: 38px;
	color: var(--text-color);
	resize: none;
	outline: none;
}

.box-expand {
	display: flex;
	align-items: center;
	margin-left: 3.6rem;
	margin-top: 0.3125rem;
}

.shoka-avatar {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
}

/* 抽屉 */
.side-bg {
	background: var(--grey-1);
}

.author-avatar {
	display: block;
	max-width: 10rem;
	margin: 0 auto;
	padding: 0.125rem;
	box-shadow: 0 0 1rem 0.625rem var(--body-bg-shadow);
	border: 0.0625rem solid var(--body-bg-shadow);
	border-radius: 50%;
	animation: 1000ms ease-in-out 0ms 1 normal forwards running blur;

	&:hover {
		-webkit-animation: author-shake 1s;
		animation: 1000ms ease 0ms 1 normal none running author-shake;
	}
}

.author-name {
	margin-top: 0.5rem;
	font-weight: 400;
	text-align: center;
	color: var(--grey-7);
}

.site-desc {
	margin-top: 0.5rem;
	font-size: 1em;
	text-align: center;
	color: var(--grey-5);
}

.blog-container {
	display: flex;
	justify-content: center;
	margin-top: 0.8rem;
	line-height: 1.4;
	text-align: center;
}

.blog-item {
	color: var(--grey-6);
	padding: 0 0.7rem;

	&:not(:first-child) {
		border-left: 0.0625rem solid var(--grey-4);
	}
}

.count {
	font-size: 1.25rem;
	font-weight: 600;
	text-align: center;
}

.name {
	font-size: 0.875rem;
}

.social-container {
	margin-top: 1rem;
	text-align: center;

	.social-item {
		display: inline-block;
		width: 1.875rem;
		height: 1.875rem;
		margin: 0 0.125rem;
		text-align: center;
	}
}

/* 说说 */
.talk-user-name {
	display: flex;
	align-items: center;
	font-size: 0.875rem;
	font-weight: 600;
	margin-right: 0.3125rem;
	color: #ef89c6;
}

.talk-content {
	margin-top: 0.3125rem;
	font-size: 0.9375rem;
	line-height: 1.5rem;
	word-wrap: break-word;
	word-break: break-all;
	white-space: pre-line;
}

.talk-image {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	align-content: flex-start;
	flex-wrap: wrap;
	margin-top: 0.3125rem;

	.image {
		max-width: 15rem;
		max-height: 12.5rem;
		padding: 1px;
		border-radius: 0.25rem;
		cursor: pointer;
		object-fit: cover;
	}
}

.talk-time,
.talk-like,
.talk-comment {
	font-size: 0.8125rem;
	margin-right: 1.25rem;
	color: #9499a0;
}

/* 点赞 */
.like-flag {
	color: var(--color-pink);
}

/* 音乐播放器显示隐藏 */
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
	left: -66px !important;
}

.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
	left: 0 !important;
}